const commonFunction = {
  Relay: {
    src: ['dispatchMessage', 'dispatchMessageBatch', 'dispatchMessageV2'],
    dest: ['receiveMessage', 'receiveBatchMessage']
  },
  Mint: {
    smgHtlc: ['smgMintLock', 'smgMintRedeem', 'smgMintRevoke'],
    walletHtlc: ['userMintLock', 'userMintRedeem', 'userMintRevoke'],
    smgRapid: ['smgFastMint'],
    walletRapid: ['userFastMint'],
  },
  Burn: {
    smgHtlc: ['smgBurnLock', 'smgBurnRedeem', 'smgBurnRevoke'],
    walletHtlc: ['userBurnLock', 'userBurnRedeem', 'userBurnRevoke'],
    smgRapid: ['smgFastBurn'],
    walletRapid: ['userFastBurn'],
  },
  Lock: {
    smgRapid: ['smgMint', 'smgMintNFT'],
    walletRapid: ['userLock', 'userLockNFT'],
  },
  Release: {
    smgRapid: ['smgRelease', 'smgReleaseNFT'],
    walletRapid: ['userBurn', 'userBurnNFT'],
  },
  Debt: {
    src: ['srcDebtLock', 'srcDebtRedeem', 'srcDebtRevoke'],
    dest: ['destDebtLock', 'destDebtRedeem', 'destDebtRevoke']
  },
  FastDebt: {
    src: ['transferAsset'],
    dest: ['receiveDebt']
  },
  WithdrawFee: 'smgWithdrawFee'
}

let config ={
    FUNCTION: {
        ...commonFunction,
        Lock: {
          smgRapid: ['smg_mint'],
          walletRapid: ['user_lock'],
        },
        Release: {
          smgRapid: ['smg_release'],
          walletRapid: ['user_burn'],
        }
      },
}

console.log(JSON.stringify(config));